{
 "cells": [
  {
   "cell_type": "code",
   "metadata": {
    "jupyter": {
     "is_executing": true
    }
   },
   "source": [
    "import numpy as np \n",
    "import pandas as pd \n",
    "import matplotlib.pyplot as plt \n",
    "%matplotlib inline \n",
    "plt.style.use('ggplot')\n",
    "import seaborn as sns \n",
    "import score_card as sc\n",
    "import warnings \n",
    "warnings.filterwarnings('ignore')\n",
    "\n",
    "import lightgbm as lgb \n",
    "from lightgbm import plot_importance \n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.model_selection import train_test_split \n",
    "from sklearn import metrics\n",
    "from sklearn.model_selection import cross_val_score\n",
    "from sklearn.model_selection import StratifiedKFold\n",
    "\n",
    "\n",
    "import os \n",
    "os.chdir('F:/安装包/PPD-First-Round-Data-Updated/PPD-First-Round-Data-Update/')"
   ],
   "outputs": [],
   "execution_count": null
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-17T02:57:51.284077Z",
     "start_time": "2019-02-17T02:57:42.938856Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SocialNetwork_10</th>\n",
       "      <th>SocialNetwork_13</th>\n",
       "      <th>SocialNetwork_8</th>\n",
       "      <th>SocialNetwork_9</th>\n",
       "      <th>ThirdParty_Info_Period1_1</th>\n",
       "      <th>ThirdParty_Info_Period1_10</th>\n",
       "      <th>ThirdParty_Info_Period1_11</th>\n",
       "      <th>ThirdParty_Info_Period1_12</th>\n",
       "      <th>ThirdParty_Info_Period1_13</th>\n",
       "      <th>ThirdParty_Info_Period1_14</th>\n",
       "      <th>...</th>\n",
       "      <th>_mobilephone</th>\n",
       "      <th>_qq</th>\n",
       "      <th>_realname</th>\n",
       "      <th>_turnover</th>\n",
       "      <th>update_time_cnt</th>\n",
       "      <th>update_all_cnt</th>\n",
       "      <th>log_cnt</th>\n",
       "      <th>log_timespan</th>\n",
       "      <th>avg_log_timespan</th>\n",
       "      <th>Idx</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>222.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>126.0</td>\n",
       "      <td>234.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>63.0</td>\n",
       "      <td>27489.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>19.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.631579</td>\n",
       "      <td>10001.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>33.0</td>\n",
       "      <td>110.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3839.0</td>\n",
       "      <td>9558.0</td>\n",
       "      <td>...</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>24.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>10.375000</td>\n",
       "      <td>10002.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3578.0</td>\n",
       "      <td>5360.0</td>\n",
       "      <td>...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>14.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>10003.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3805.0</td>\n",
       "      <td>9765.0</td>\n",
       "      <td>...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>10006.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>561.0</td>\n",
       "      <td>792.0</td>\n",
       "      <td>...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.400000</td>\n",
       "      <td>10007.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 162 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   SocialNetwork_10  SocialNetwork_13  SocialNetwork_8  SocialNetwork_9  \\\n",
       "0             222.0               0.0            126.0            234.0   \n",
       "1               1.0               0.0             33.0            110.0   \n",
       "2               NaN               1.0              NaN              NaN   \n",
       "3               NaN               0.0              NaN              NaN   \n",
       "4               NaN               0.0              NaN              NaN   \n",
       "\n",
       "   ThirdParty_Info_Period1_1  ThirdParty_Info_Period1_10  \\\n",
       "0                       10.0                         1.0   \n",
       "1                        0.0                         1.0   \n",
       "2                        1.0                         0.0   \n",
       "3                        9.0                         1.0   \n",
       "4                        1.0                         1.0   \n",
       "\n",
       "   ThirdParty_Info_Period1_11  ThirdParty_Info_Period1_12  \\\n",
       "0                        10.0                        63.0   \n",
       "1                         8.0                         0.0   \n",
       "2                         7.0                         0.0   \n",
       "3                         9.0                         0.0   \n",
       "4                         5.0                         0.0   \n",
       "\n",
       "   ThirdParty_Info_Period1_13  ThirdParty_Info_Period1_14  ...  _mobilephone  \\\n",
       "0                     27489.0                         0.0  ...           1.0   \n",
       "1                      3839.0                      9558.0  ...           2.0   \n",
       "2                      3578.0                      5360.0  ...           1.0   \n",
       "3                      3805.0                      9765.0  ...           1.0   \n",
       "4                       561.0                       792.0  ...           1.0   \n",
       "\n",
       "   _qq  _realname  _turnover  update_time_cnt  update_all_cnt  log_cnt  \\\n",
       "0  1.0        0.0        0.0              1.0            11.0     19.0   \n",
       "1  1.0        1.0        0.0              3.0            21.0     24.0   \n",
       "2  1.0        0.0        0.0              1.0            10.0     14.0   \n",
       "3  1.0        0.0        0.0              1.0            10.0      7.0   \n",
       "4  1.0        0.0        0.0              2.0            10.0      5.0   \n",
       "\n",
       "   log_timespan  avg_log_timespan      Idx  \n",
       "0           1.0          0.631579  10001.0  \n",
       "1           1.0         10.375000  10002.0  \n",
       "2           1.0          0.500000  10003.0  \n",
       "3           5.0          0.000000  10006.0  \n",
       "4           0.0          1.400000  10007.0  \n",
       "\n",
       "[5 rows x 162 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df  = pd.read_csv('feature_select_data1.csv',encoding='gb18030')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 两种版本的lgb默认参数模型"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## sklearn版本"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-17T02:57:51.599095Z",
     "start_time": "2019-02-17T02:57:51.295077Z"
    }
   },
   "outputs": [],
   "source": [
    "# 默认参数模型\n",
    "df_train, df_test = train_test_split(df[df.sample_status=='train'])\n",
    "x_train = df_train.drop(['Idx','sample_status','target'],axis=1)\n",
    "x_test = df_test.drop(['Idx','sample_status','target'],axis=1)\n",
    "y_train = df_train['target']\n",
    "y_test = df_test['target']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "运行时间为2.0秒\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "start = time.time()\n",
    "lgb_sklearn = lgb.LGBMClassifier(random_state=0).fit(x_train,y_train)\n",
    "end = time.time()\n",
    "print('运行时间为{}秒'.format(round(end-start,0)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEJCAYAAACXCJy4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uI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BEn5GSHEELECQl8IYSIExL4QggRJyTwhRAiTkjgCyFEnJDAF0KIOCGBL4QQceL/AWkiYNBdarVrAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 默认参数模型的AUC\n",
    "lgb_sklearn_pre = lgb_sklearn.predict_proba(x_test)[:,1]\n",
    "sc.plot_roc(y_test,lgb_sklearn_pre)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'boosting_type': 'gbdt',\n",
       " 'class_weight': None,\n",
       " 'colsample_bytree': 1.0,\n",
       " 'learning_rate': 0.1,\n",
       " 'max_depth': -1,\n",
       " 'min_child_samples': 20,\n",
       " 'min_child_weight': 0.001,\n",
       " 'min_split_gain': 0.0,\n",
       " 'n_estimators': 100,\n",
       " 'n_jobs': -1,\n",
       " 'num_leaves': 31,\n",
       " 'objective': None,\n",
       " 'random_state': 0,\n",
       " 'reg_alpha': 0.0,\n",
       " 'reg_lambda': 0.0,\n",
       " 'silent': True,\n",
       " 'subsample': 1.0,\n",
       " 'subsample_for_bin': 200000,\n",
       " 'subsample_freq': 1}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lgb_sklearn.get_params()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 原生版本 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1]\tvalid_0's auc: 0.622606\n",
      "Training until validation scores don't improve for 10 rounds.\n",
      "[2]\tvalid_0's auc: 0.647695\n",
      "[3]\tvalid_0's auc: 0.653779\n",
      "[4]\tvalid_0's auc: 0.658976\n",
      "[5]\tvalid_0's auc: 0.659995\n",
      "[6]\tvalid_0's auc: 0.661547\n",
      "[7]\tvalid_0's auc: 0.662313\n",
      "[8]\tvalid_0's auc: 0.663344\n",
      "[9]\tvalid_0's auc: 0.662904\n",
      "[10]\tvalid_0's auc: 0.664399\n",
      "[11]\tvalid_0's auc: 0.667781\n",
      "[12]\tvalid_0's auc: 0.668489\n",
      "[13]\tvalid_0's auc: 0.668705\n",
      "[14]\tvalid_0's auc: 0.668388\n",
      "[15]\tvalid_0's auc: 0.671133\n",
      "[16]\tvalid_0's auc: 0.675323\n",
      "[17]\tvalid_0's auc: 0.67653\n",
      "[18]\tvalid_0's auc: 0.676177\n",
      "[19]\tvalid_0's auc: 0.677424\n",
      "[20]\tvalid_0's auc: 0.679107\n",
      "[21]\tvalid_0's auc: 0.681189\n",
      "[22]\tvalid_0's auc: 0.682757\n",
      "[23]\tvalid_0's auc: 0.684421\n",
      "[24]\tvalid_0's auc: 0.684794\n",
      "[25]\tvalid_0's auc: 0.685962\n",
      "[26]\tvalid_0's auc: 0.686567\n",
      "[27]\tvalid_0's auc: 0.686671\n",
      "[28]\tvalid_0's auc: 0.686389\n",
      "[29]\tvalid_0's auc: 0.686924\n",
      "[30]\tvalid_0's auc: 0.687646\n",
      "[31]\tvalid_0's auc: 0.687837\n",
      "[32]\tvalid_0's auc: 0.688133\n",
      "[33]\tvalid_0's auc: 0.687786\n",
      "[34]\tvalid_0's auc: 0.688113\n",
      "[35]\tvalid_0's auc: 0.689214\n",
      "[36]\tvalid_0's auc: 0.689619\n",
      "[37]\tvalid_0's auc: 0.691334\n",
      "[38]\tvalid_0's auc: 0.692824\n",
      "[39]\tvalid_0's auc: 0.692466\n",
      "[40]\tvalid_0's auc: 0.692119\n",
      "[41]\tvalid_0's auc: 0.692598\n",
      "[42]\tvalid_0's auc: 0.69318\n",
      "[43]\tvalid_0's auc: 0.693286\n",
      "[44]\tvalid_0's auc: 0.693514\n",
      "[45]\tvalid_0's auc: 0.694447\n",
      "[46]\tvalid_0's auc: 0.694882\n",
      "[47]\tvalid_0's auc: 0.694657\n",
      "[48]\tvalid_0's auc: 0.695477\n",
      "[49]\tvalid_0's auc: 0.69594\n",
      "[50]\tvalid_0's auc: 0.696304\n",
      "[51]\tvalid_0's auc: 0.697402\n",
      "[52]\tvalid_0's auc: 0.698247\n",
      "[53]\tvalid_0's auc: 0.697532\n",
      "[54]\tvalid_0's auc: 0.69896\n",
      "[55]\tvalid_0's auc: 0.700163\n",
      "[56]\tvalid_0's auc: 0.700425\n",
      "[57]\tvalid_0's auc: 0.701843\n",
      "[58]\tvalid_0's auc: 0.701716\n",
      "[59]\tvalid_0's auc: 0.702175\n",
      "[60]\tvalid_0's auc: 0.702473\n",
      "[61]\tvalid_0's auc: 0.703233\n",
      "[62]\tvalid_0's auc: 0.703432\n",
      "[63]\tvalid_0's auc: 0.704793\n",
      "[64]\tvalid_0's auc: 0.7048\n",
      "[65]\tvalid_0's auc: 0.704767\n",
      "[66]\tvalid_0's auc: 0.704521\n",
      "[67]\tvalid_0's auc: 0.704995\n",
      "[68]\tvalid_0's auc: 0.705148\n",
      "[69]\tvalid_0's auc: 0.705592\n",
      "[70]\tvalid_0's auc: 0.706123\n",
      "[71]\tvalid_0's auc: 0.707948\n",
      "[72]\tvalid_0's auc: 0.708267\n",
      "[73]\tvalid_0's auc: 0.708849\n",
      "[74]\tvalid_0's auc: 0.709839\n",
      "[75]\tvalid_0's auc: 0.709783\n",
      "[76]\tvalid_0's auc: 0.709243\n",
      "[77]\tvalid_0's auc: 0.70953\n",
      "[78]\tvalid_0's auc: 0.709842\n",
      "[79]\tvalid_0's auc: 0.710199\n",
      "[80]\tvalid_0's auc: 0.709517\n",
      "[81]\tvalid_0's auc: 0.710195\n",
      "[82]\tvalid_0's auc: 0.710401\n",
      "[83]\tvalid_0's auc: 0.710974\n",
      "[84]\tvalid_0's auc: 0.710942\n",
      "[85]\tvalid_0's auc: 0.710949\n",
      "[86]\tvalid_0's auc: 0.711005\n",
      "[87]\tvalid_0's auc: 0.710814\n",
      "[88]\tvalid_0's auc: 0.711012\n",
      "[89]\tvalid_0's auc: 0.711161\n",
      "[90]\tvalid_0's auc: 0.711288\n",
      "[91]\tvalid_0's auc: 0.711691\n",
      "[92]\tvalid_0's auc: 0.711413\n",
      "[93]\tvalid_0's auc: 0.711592\n",
      "[94]\tvalid_0's auc: 0.711533\n",
      "[95]\tvalid_0's auc: 0.711964\n",
      "[96]\tvalid_0's auc: 0.712042\n",
      "[97]\tvalid_0's auc: 0.712244\n",
      "[98]\tvalid_0's auc: 0.713777\n",
      "[99]\tvalid_0's auc: 0.714067\n",
      "[100]\tvalid_0's auc: 0.714559\n",
      "[101]\tvalid_0's auc: 0.714206\n",
      "[102]\tvalid_0's auc: 0.714277\n",
      "[103]\tvalid_0's auc: 0.714522\n",
      "[104]\tvalid_0's auc: 0.714791\n",
      "[105]\tvalid_0's auc: 0.715598\n",
      "[106]\tvalid_0's auc: 0.716083\n",
      "[107]\tvalid_0's auc: 0.715917\n",
      "[108]\tvalid_0's auc: 0.716278\n",
      "[109]\tvalid_0's auc: 0.71624\n",
      "[110]\tvalid_0's auc: 0.716421\n",
      "[111]\tvalid_0's auc: 0.716643\n",
      "[112]\tvalid_0's auc: 0.716977\n",
      "[113]\tvalid_0's auc: 0.717246\n",
      "[114]\tvalid_0's auc: 0.718212\n",
      "[115]\tvalid_0's auc: 0.718627\n",
      "[116]\tvalid_0's auc: 0.71884\n",
      "[117]\tvalid_0's auc: 0.718844\n",
      "[118]\tvalid_0's auc: 0.719163\n",
      "[119]\tvalid_0's auc: 0.719871\n",
      "[120]\tvalid_0's auc: 0.719777\n",
      "[121]\tvalid_0's auc: 0.719883\n",
      "[122]\tvalid_0's auc: 0.719919\n",
      "[123]\tvalid_0's auc: 0.720015\n",
      "[124]\tvalid_0's auc: 0.720152\n",
      "[125]\tvalid_0's auc: 0.720051\n",
      "[126]\tvalid_0's auc: 0.720375\n",
      "[127]\tvalid_0's auc: 0.72068\n",
      "[128]\tvalid_0's auc: 0.721131\n",
      "[129]\tvalid_0's auc: 0.721429\n",
      "[130]\tvalid_0's auc: 0.722505\n",
      "[131]\tvalid_0's auc: 0.722579\n",
      "[132]\tvalid_0's auc: 0.722487\n",
      "[133]\tvalid_0's auc: 0.722843\n",
      "[134]\tvalid_0's auc: 0.723186\n",
      "[135]\tvalid_0's auc: 0.723153\n",
      "[136]\tvalid_0's auc: 0.723135\n",
      "[137]\tvalid_0's auc: 0.723373\n",
      "[138]\tvalid_0's auc: 0.723495\n",
      "[139]\tvalid_0's auc: 0.724251\n",
      "[140]\tvalid_0's auc: 0.724266\n",
      "[141]\tvalid_0's auc: 0.724962\n",
      "[142]\tvalid_0's auc: 0.725292\n",
      "[143]\tvalid_0's auc: 0.725383\n",
      "[144]\tvalid_0's auc: 0.725417\n",
      "[145]\tvalid_0's auc: 0.725069\n",
      "[146]\tvalid_0's auc: 0.725199\n",
      "[147]\tvalid_0's auc: 0.725015\n",
      "[148]\tvalid_0's auc: 0.725371\n",
      "[149]\tvalid_0's auc: 0.724997\n",
      "[150]\tvalid_0's auc: 0.72535\n",
      "[151]\tvalid_0's auc: 0.725254\n",
      "[152]\tvalid_0's auc: 0.725195\n",
      "[153]\tvalid_0's auc: 0.725424\n",
      "[154]\tvalid_0's auc: 0.725411\n",
      "[155]\tvalid_0's auc: 0.725291\n",
      "[156]\tvalid_0's auc: 0.725042\n",
      "[157]\tvalid_0's auc: 0.725112\n",
      "[158]\tvalid_0's auc: 0.724863\n",
      "[159]\tvalid_0's auc: 0.725608\n",
      "[160]\tvalid_0's auc: 0.72547\n",
      "[161]\tvalid_0's auc: 0.725966\n",
      "[162]\tvalid_0's auc: 0.725773\n",
      "[163]\tvalid_0's auc: 0.725989\n",
      "[164]\tvalid_0's auc: 0.726013\n",
      "[165]\tvalid_0's auc: 0.726686\n",
      "[166]\tvalid_0's auc: 0.726338\n",
      "[167]\tvalid_0's auc: 0.726211\n",
      "[168]\tvalid_0's auc: 0.726087\n",
      "[169]\tvalid_0's auc: 0.726441\n",
      "[170]\tvalid_0's auc: 0.726251\n",
      "[171]\tvalid_0's auc: 0.72634\n",
      "[172]\tvalid_0's auc: 0.726392\n",
      "[173]\tvalid_0's auc: 0.726271\n",
      "[174]\tvalid_0's auc: 0.726159\n",
      "[175]\tvalid_0's auc: 0.726368\n",
      "Early stopping, best iteration is:\n",
      "[165]\tvalid_0's auc: 0.726686\n",
      "运行时间为3.0秒\n"
     ]
    }
   ],
   "source": [
    "# 原生的lightgbm\n",
    "lgb_train = lgb.Dataset(x_train,y_train)\n",
    "lgb_test = lgb.Dataset(x_test,y_test,reference=lgb_train)\n",
    "lgb_origi_params = {'boosting_type':'gbdt',\n",
    "              'max_depth':-1,\n",
    "              'num_leaves':31,\n",
    "              'bagging_fraction':0.8,\n",
    "              'feature_fraction':0.8,\n",
    "              'learning_rate':0.03,\n",
    "              'metric': 'auc'}\n",
    "start = time.time()\n",
    "lgb_origi = lgb.train(train_set=lgb_train,\n",
    "                      early_stopping_rounds=10,\n",
    "                      num_boost_round=3000,\n",
    "                      params=lgb_origi_params,\n",
    "                      valid_sets=lgb_test)\n",
    "end = time.time()\n",
    "print('运行时间为{}秒'.format(round(end-start,0)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEJCAYAAACXCJy4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8VPW9//HXmcxkYwsQuApYy1XqFdwQF5BbxB3EAgp8AaVKBVErVkRQKS5VqxW3/ryWosi1Cij4FWnQooJ14yrgvlSQKu4EFAgQluzJ+f0xiYkxIUOYmXNm5v18PHjozJxkPnwNb798zpnPcVzXRUREkl/A6wJERCQ+FPgiIilCgS8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xj8a3yrjJtHgQF7eX0g0K361wRgViTfNNYtnZiNZUhATa6FtfYVa23NDQJWE/7MQzKK5OcC4DbCG4CSeBYXZ5GsxSXATGvtdgBr7eY41xgvkayFC7Su/vc2wMY41hc31toVwLa9HDIEmGutda21q4EcY8yBTX3fWAd+Q2MZOjd2TPUloDVjGZJNJGtR1zjg+ZhW5J0m18IYcyxwkLV2aTwL80AkPxe/AH5hjHnDGLO6uu2RjCJZiz8AY4wxG4DngCvjU5rv7GueADpp60vGmDHAccDdXtfiBWNMALgPuMbrWnwiSPiv7v2B0cDDxpgcTyvyzmjgUWttF8L963nVPy8SgVgvlMYy1IpkLTDGnA5MBwZba0vjVFu8NbUWrYAjgFeNMV8BvYFnjDHHxa3C+Ink52ID8Iy1ttxa+yXwKeH/ASSbSNZiHGABrLWrgEwgNy7V+UtEeVJfrK/S0ViGWk2uhTGmJ/AQMCCJ+7TQxFpYawup84fYGPMqMCVJr9KJ5M9IHuGd7d+MMbmEWzxfxLXK+IhkLb4BTgMeNcYcTjjwt8S1Sn94BphojFlIeHpxobV2U1NfFNMdfgzHMiScCNfibqAl8JQx5gNjzDMelRtTEa5FSohwLZYBBcaYtcArwFRrbdL9LTjCtbgGuMQY8yGwgPDliEm3QTTGLCC8CT7MGLPBGDPOGHOZMeay6kOeI/w//fXAw8BvI/m+Gq0gIpIidLJDRCRFKPBFRFKEAl9EJEUo8EVEUoQCX0QkRSjwRURShAJfRCRF/H8ZUHqhLcfN6wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 原生的lightgbm的AUC\n",
    "lgb_origi_pre = lgb_origi.predict(x_test)\n",
    "sc.plot_roc(y_test,lgb_origi_pre)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 调参"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 确定最大迭代次数，学习率设为0.1 \n",
    "base_parmas={'boosting_type':'gbdt',\n",
    "             'learning_rate':0.03,\n",
    "             'num_leaves':40,\n",
    "             'max_depth':-1,\n",
    "             'bagging_fraction':0.8,\n",
    "             'feature_fraction':0.8,\n",
    "             'lambda_l1':0,\n",
    "             'lambda_l2':0,\n",
    "             'min_data_in_leaf':20,\n",
    "             'min_sum_hessian_inleaf':0.001,\n",
    "             'metric':'auc'}\n",
    "cv_result = lgb.cv(train_set=lgb_train,\n",
    "                   num_boost_round=200,\n",
    "                   early_stopping_rounds=5,\n",
    "                   nfold=5,\n",
    "                   stratified=True,\n",
    "                   shuffle=True,\n",
    "                   params=base_parmas,\n",
    "                   metrics='auc',\n",
    "                   seed=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最大的迭代次数: 137\n",
      "交叉验证的AUC: 0.7302596032363505\n"
     ]
    }
   ],
   "source": [
    "print('最大的迭代次数: {}'.format(len(cv_result['auc-mean'])))\n",
    "print('交叉验证的AUC: {}'.format(max(cv_result['auc-mean'])))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "运行时间为:31.0\n"
     ]
    }
   ],
   "source": [
    "# num_leaves ，步长设为5\n",
    "param_find1 = {'num_leaves':range(30,100,10)}\n",
    "cv_fold = StratifiedKFold(n_splits=5,random_state=0,shuffle=True)\n",
    "start = time.time()\n",
    "grid_search1 = GridSearchCV(estimator=lgb.LGBMClassifier(learning_rate=0.1,\n",
    "                                                         n_estimators = 51,\n",
    "                                                         max_depth=-1,\n",
    "                                                         min_child_weight=0.001,\n",
    "                                                         min_child_samples=20,\n",
    "                                                         subsample=0.8,\n",
    "                                                         colsample_bytree=0.8,\n",
    "                                                         reg_lambda=0,\n",
    "                                                         reg_alpha=0),\n",
    "                             cv = cv_fold,\n",
    "                             n_jobs=-1,\n",
    "                             param_grid = param_find1,\n",
    "                             scoring='roc_auc')\n",
    "grid_search1.fit(x_train,y_train)\n",
    "end = time.time()\n",
    "print('运行时间为:{}'.format(round(end-start,0)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7295372829363965\n",
      "\t\n",
      "{'num_leaves': 30}\n",
      "\t\n",
      "0.7295372829363965\n"
     ]
    }
   ],
   "source": [
    "print(grid_search1.best_score_)\n",
    "print('\\t')\n",
    "print(grid_search1.best_params_)\n",
    "print('\\t')\n",
    "print(grid_search1.best_score_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7349002141018806\n",
      "\t\n",
      "{'num_leaves': 16}\n",
      "\t\n",
      "0.7349002141018806\n"
     ]
    }
   ],
   "source": [
    "# num_leaves,步长设为2 \n",
    "param_find2 = {'num_leaves':range(16,64,16)}\n",
    "grid_search2 = GridSearchCV(estimator=lgb.LGBMClassifier(estimator=51,\n",
    "                                                         learning_rate=0.1,\n",
    "                                                         min_child_weight=0.001,\n",
    "                                                         min_child_samples=20,\n",
    "                                                         subsample=0.8,\n",
    "                                                         colsample_bytree=0.8,\n",
    "                                                         reg_lambda=0,\n",
    "                                                         reg_alpha=0\n",
    "                                                         ),\n",
    "                            cv=cv_fold,\n",
    "                            n_jobs=-1,\n",
    "                            scoring='roc_auc',\n",
    "                            param_grid = param_find2)\n",
    "grid_search2.fit(x_train,y_train)\n",
    "print(grid_search2.best_score_)\n",
    "print('\\t')\n",
    "print(grid_search2.best_params_)\n",
    "print('\\t')\n",
    "print(grid_search2.best_score_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "运行时间:312.0 秒\n",
      "[mean: 0.73155, std: 0.01112, params: {'min_child_samples': 15, 'min_child_weight': 0.001}, mean: 0.73155, std: 0.01112, params: {'min_child_samples': 15, 'min_child_weight': 0.002}, mean: 0.73155, std: 0.01112, params: {'min_child_samples': 15, 'min_child_weight': 0.003}, mean: 0.73355, std: 0.01589, params: {'min_child_samples': 20, 'min_child_weight': 0.001}, mean: 0.73355, std: 0.01589, params: {'min_child_samples': 20, 'min_child_weight': 0.002}, mean: 0.73355, std: 0.01589, params: {'min_child_samples': 20, 'min_child_weight': 0.003}, mean: 0.73206, std: 0.01434, params: {'min_child_samples': 25, 'min_child_weight': 0.001}, mean: 0.73206, std: 0.01434, params: {'min_child_samples': 25, 'min_child_weight': 0.002}, mean: 0.73206, std: 0.01434, params: {'min_child_samples': 25, 'min_child_weight': 0.003}, mean: 0.73210, std: 0.01145, params: {'min_child_samples': 30, 'min_child_weight': 0.001}, mean: 0.73210, std: 0.01145, params: {'min_child_samples': 30, 'min_child_weight': 0.002}, mean: 0.73210, std: 0.01145, params: {'min_child_samples': 30, 'min_child_weight': 0.003}]\n",
      "\t\n",
      "{'min_child_samples': 20, 'min_child_weight': 0.001}\n",
      "\t\n",
      "0.733552244998121\n"
     ]
    }
   ],
   "source": [
    "# 确定num_leaves 为30 ，下面进行min_child_samples 和 min_child_weight的调参，设定步长为5\n",
    "param_find3 = {'min_child_samples':range(15,35,5),\n",
    "               'min_child_weight':[x/1000 for x in range(1,4,1)]}\n",
    "grid_search3 = GridSearchCV(estimator=lgb.LGBMClassifier(estimator=51,\n",
    "                                                         learning_rate=0.1,\n",
    "                                                         num_leaves=30,\n",
    "                                                         subsample=0.8,\n",
    "                                                         colsample_bytree=0.8,\n",
    "                                                         reg_lambda=0,\n",
    "                                                         reg_alpha=0\n",
    "                                                         ),\n",
    "                            cv=cv_fold,\n",
    "                            scoring='roc_auc',\n",
    "                            param_grid = param_find3,\n",
    "                            n_jobs=-1)\n",
    "start = time.time()\n",
    "grid_search3.fit(x_train,y_train)\n",
    "end = time.time()\n",
    "print('运行时间:{} 秒'.format(round(end-start,0)))\n",
    "print(grid_search3.grid_scores_)\n",
    "print('\\t')\n",
    "print(grid_search3.best_params_)\n",
    "print('\\t')\n",
    "print(grid_search3.best_score_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "运行时间:826.0 秒\n",
      "[mean: 0.73467, std: 0.01475, params: {'colsample_bytree': 0.5, 'subsample': 0.5}, mean: 0.73467, std: 0.01475, params: {'colsample_bytree': 0.5, 'subsample': 0.6}, mean: 0.73467, std: 0.01475, params: {'colsample_bytree': 0.5, 'subsample': 0.7}, mean: 0.73467, std: 0.01475, params: {'colsample_bytree': 0.5, 'subsample': 0.8}, mean: 0.73467, std: 0.01475, params: {'colsample_bytree': 0.5, 'subsample': 0.9}, mean: 0.73467, std: 0.01475, params: {'colsample_bytree': 0.5, 'subsample': 1.0}, mean: 0.73500, std: 0.01559, params: {'colsample_bytree': 0.6, 'subsample': 0.5}, mean: 0.73500, std: 0.01559, params: {'colsample_bytree': 0.6, 'subsample': 0.6}, mean: 0.73500, std: 0.01559, params: {'colsample_bytree': 0.6, 'subsample': 0.7}, mean: 0.73500, std: 0.01559, params: {'colsample_bytree': 0.6, 'subsample': 0.8}, mean: 0.73500, std: 0.01559, params: {'colsample_bytree': 0.6, 'subsample': 0.9}, mean: 0.73500, std: 0.01559, params: {'colsample_bytree': 0.6, 'subsample': 1.0}, mean: 0.73053, std: 0.01389, params: {'colsample_bytree': 0.7, 'subsample': 0.5}, mean: 0.73053, std: 0.01389, params: {'colsample_bytree': 0.7, 'subsample': 0.6}, mean: 0.73053, std: 0.01389, params: {'colsample_bytree': 0.7, 'subsample': 0.7}, mean: 0.73053, std: 0.01389, params: {'colsample_bytree': 0.7, 'subsample': 0.8}, mean: 0.73053, std: 0.01389, params: {'colsample_bytree': 0.7, 'subsample': 0.9}, mean: 0.73053, std: 0.01389, params: {'colsample_bytree': 0.7, 'subsample': 1.0}, mean: 0.73355, std: 0.01589, params: {'colsample_bytree': 0.8, 'subsample': 0.5}, mean: 0.73355, std: 0.01589, params: {'colsample_bytree': 0.8, 'subsample': 0.6}, mean: 0.73355, std: 0.01589, params: {'colsample_bytree': 0.8, 'subsample': 0.7}, mean: 0.73355, std: 0.01589, params: {'colsample_bytree': 0.8, 'subsample': 0.8}, mean: 0.73355, std: 0.01589, params: {'colsample_bytree': 0.8, 'subsample': 0.9}, mean: 0.73355, std: 0.01589, params: {'colsample_bytree': 0.8, 'subsample': 1.0}, mean: 0.73304, std: 0.01103, params: {'colsample_bytree': 0.9, 'subsample': 0.5}, mean: 0.73304, std: 0.01103, params: {'colsample_bytree': 0.9, 'subsample': 0.6}, mean: 0.73304, std: 0.01103, params: {'colsample_bytree': 0.9, 'subsample': 0.7}, mean: 0.73304, std: 0.01103, params: {'colsample_bytree': 0.9, 'subsample': 0.8}, mean: 0.73304, std: 0.01103, params: {'colsample_bytree': 0.9, 'subsample': 0.9}, mean: 0.73304, std: 0.01103, params: {'colsample_bytree': 0.9, 'subsample': 1.0}, mean: 0.73427, std: 0.01462, params: {'colsample_bytree': 1.0, 'subsample': 0.5}, mean: 0.73427, std: 0.01462, params: {'colsample_bytree': 1.0, 'subsample': 0.6}, mean: 0.73427, std: 0.01462, params: {'colsample_bytree': 1.0, 'subsample': 0.7}, mean: 0.73427, std: 0.01462, params: {'colsample_bytree': 1.0, 'subsample': 0.8}, mean: 0.73427, std: 0.01462, params: {'colsample_bytree': 1.0, 'subsample': 0.9}, mean: 0.73427, std: 0.01462, params: {'colsample_bytree': 1.0, 'subsample': 1.0}]\n",
      "\t\n",
      "{'colsample_bytree': 0.6, 'subsample': 0.5}\n",
      "\t\n",
      "0.7349957573843382\n"
     ]
    }
   ],
   "source": [
    "# 确定min_child_weight为0.001，min_child_samples为20,下面对subsample和colsample_bytree进行调参\n",
    "param_find4 = {'subsample':[x/10 for x in range(5,11,1)],\n",
    "               'colsample_bytree':[x/10 for x in range(5,11,1)]}\n",
    "grid_search4 = GridSearchCV(estimator=lgb.LGBMClassifier(estimator=51,\n",
    "                                                         learning_rate=0.1,\n",
    "                                                         min_child_samples=20,\n",
    "                                                         min_child_weight=0.001,\n",
    "                                                         num_leaves=30,\n",
    "                                                         subsample=0.8,\n",
    "                                                         colsample_bytree=0.8,\n",
    "                                                         reg_lambda=0,\n",
    "                                                         reg_alpha=0\n",
    "                                                         ),\n",
    "                            cv=cv_fold,\n",
    "                            scoring='roc_auc',\n",
    "                            param_grid = param_find4,\n",
    "                            n_jobs=-1)\n",
    "start = time.time()\n",
    "grid_search4.fit(x_train,y_train)\n",
    "end = time.time()\n",
    "print('运行时间:{} 秒'.format(round(end-start,0)))\n",
    "print(grid_search4.grid_scores_)\n",
    "print('\\t')\n",
    "print(grid_search4.best_params_)\n",
    "print('\\t')\n",
    "print(grid_search4.best_score_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "运行时间:692.0 秒\n",
      "[mean: 0.73386, std: 0.01566, params: {'reg_alpha': 0.001, 'reg_lambda': 0.001}, mean: 0.73284, std: 0.01099, params: {'reg_alpha': 0.001, 'reg_lambda': 0.01}, mean: 0.73024, std: 0.01294, params: {'reg_alpha': 0.001, 'reg_lambda': 0.03}, mean: 0.73565, std: 0.01237, params: {'reg_alpha': 0.001, 'reg_lambda': 0.08}, mean: 0.73300, std: 0.01580, params: {'reg_alpha': 0.001, 'reg_lambda': 0.1}, mean: 0.73713, std: 0.01489, params: {'reg_alpha': 0.001, 'reg_lambda': 0.3}, mean: 0.73173, std: 0.01727, params: {'reg_alpha': 0.01, 'reg_lambda': 0.001}, mean: 0.73586, std: 0.01282, params: {'reg_alpha': 0.01, 'reg_lambda': 0.01}, mean: 0.73424, std: 0.01136, params: {'reg_alpha': 0.01, 'reg_lambda': 0.03}, mean: 0.73601, std: 0.01579, params: {'reg_alpha': 0.01, 'reg_lambda': 0.08}, mean: 0.73688, std: 0.01218, params: {'reg_alpha': 0.01, 'reg_lambda': 0.1}, mean: 0.73459, std: 0.01598, params: {'reg_alpha': 0.01, 'reg_lambda': 0.3}, mean: 0.73395, std: 0.01492, params: {'reg_alpha': 0.03, 'reg_lambda': 0.001}, mean: 0.73688, std: 0.01137, params: {'reg_alpha': 0.03, 'reg_lambda': 0.01}, mean: 0.73430, std: 0.01592, params: {'reg_alpha': 0.03, 'reg_lambda': 0.03}, mean: 0.73501, std: 0.01268, params: {'reg_alpha': 0.03, 'reg_lambda': 0.08}, mean: 0.73462, std: 0.01437, params: {'reg_alpha': 0.03, 'reg_lambda': 0.1}, mean: 0.73890, std: 0.01465, params: {'reg_alpha': 0.03, 'reg_lambda': 0.3}, mean: 0.73408, std: 0.01293, params: {'reg_alpha': 0.08, 'reg_lambda': 0.001}, mean: 0.73217, std: 0.01456, params: {'reg_alpha': 0.08, 'reg_lambda': 0.01}, mean: 0.73468, std: 0.01092, params: {'reg_alpha': 0.08, 'reg_lambda': 0.03}, mean: 0.73542, std: 0.01050, params: {'reg_alpha': 0.08, 'reg_lambda': 0.08}, mean: 0.73603, std: 0.01564, params: {'reg_alpha': 0.08, 'reg_lambda': 0.1}, mean: 0.73706, std: 0.01759, params: {'reg_alpha': 0.08, 'reg_lambda': 0.3}, mean: 0.72988, std: 0.01310, params: {'reg_alpha': 0.1, 'reg_lambda': 0.001}, mean: 0.73350, std: 0.01248, params: {'reg_alpha': 0.1, 'reg_lambda': 0.01}, mean: 0.73526, std: 0.01280, params: {'reg_alpha': 0.1, 'reg_lambda': 0.03}, mean: 0.73386, std: 0.01461, params: {'reg_alpha': 0.1, 'reg_lambda': 0.08}, mean: 0.73635, std: 0.01596, params: {'reg_alpha': 0.1, 'reg_lambda': 0.1}, mean: 0.73542, std: 0.01512, params: {'reg_alpha': 0.1, 'reg_lambda': 0.3}, mean: 0.73620, std: 0.00951, params: {'reg_alpha': 0.3, 'reg_lambda': 0.001}, mean: 0.73713, std: 0.01541, params: {'reg_alpha': 0.3, 'reg_lambda': 0.01}, mean: 0.73943, std: 0.01238, params: {'reg_alpha': 0.3, 'reg_lambda': 0.03}, mean: 0.73593, std: 0.01351, params: {'reg_alpha': 0.3, 'reg_lambda': 0.08}, mean: 0.73402, std: 0.01277, params: {'reg_alpha': 0.3, 'reg_lambda': 0.1}, mean: 0.73655, std: 0.00920, params: {'reg_alpha': 0.3, 'reg_lambda': 0.3}]\n",
      "\t\n",
      "{'reg_alpha': 0.3, 'reg_lambda': 0.03}\n",
      "\t\n",
      "0.739431056578461\n"
     ]
    }
   ],
   "source": [
    "param_find5 = {'reg_lambda':[0.001,0.01,0.03,0.08,0.1,0.3],\n",
    "               'reg_alpha':[0.001,0.01,0.03,0.08,0.1,0.3]}\n",
    "grid_search5 = GridSearchCV(estimator=lgb.LGBMClassifier(estimator=51,\n",
    "                                                         learning_rate=0.1,\n",
    "                                                         min_child_samples=20,\n",
    "                                                         min_child_weight=0.001,\n",
    "                                                         num_leaves=30,\n",
    "                                                         subsample=0.5,\n",
    "                                                         colsample_bytree=0.6,\n",
    "                                                         ),\n",
    "                            cv=cv_fold,\n",
    "                            scoring='roc_auc',\n",
    "                            param_grid = param_find5,\n",
    "                            n_jobs=-1)\n",
    "start = time.time()\n",
    "grid_search5.fit(x_train,y_train)\n",
    "end = time.time()\n",
    "print('运行时间:{} 秒'.format(round(end-start,0)))\n",
    "print(grid_search5.grid_scores_)\n",
    "print('\\t')\n",
    "print(grid_search5.best_params_)\n",
    "print('\\t')\n",
    "print(grid_search5.best_score_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 将最佳参数再次带入cv函数，设定学习率为0.005\n",
    "best_params = {\n",
    "    'boosting_type':'gbdt',\n",
    "    'learning_rate':0.005,\n",
    "    'num_leaves':30,\n",
    "    'max_depth':-1,\n",
    "    'bagging_fraction':0.5,\n",
    "    'feature_fraction':0.6,\n",
    "    'min_data_in_leaf':20,\n",
    "    'min_sum_hessian_in_leaf':0.001,\n",
    "    'lambda_l1':0.3,\n",
    "    'lambda_l2':0.03,\n",
    "    'metric':'auc'\n",
    "}\n",
    "\n",
    "best_cv = lgb.cv(train_set=lgb_train,\n",
    "                 early_stopping_rounds=5,\n",
    "                 num_boost_round=2000,\n",
    "                 nfold=5,\n",
    "                 params=best_params,\n",
    "                 metrics='auc',\n",
    "                 stratified=True,\n",
    "                 shuffle=True,\n",
    "                 seed=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最佳参数的迭代次数: 889\n",
      "交叉验证的AUC: 0.7357671213094057\n"
     ]
    }
   ],
   "source": [
    "print('最佳参数的迭代次数: {}'.format(len(best_cv['auc-mean'])))\n",
    "print('交叉验证的AUC: {}'.format(max(best_cv['auc-mean'])))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LGBMClassifier(boosting_type='gbdt', class_weight=None, colsample_bytree=0.6,\n",
       "        importance_type='split', learning_rate=0.005, max_depth=-1,\n",
       "        min_child_samples=20, min_child_weight=0.001, min_split_gain=0.0,\n",
       "        n_estimators=900, n_jobs=-1, num_leaves=30, objective=None,\n",
       "        random_state=0, reg_alpha=0.3, reg_lambda=0.03, silent=True,\n",
       "        subsample=0.5, subsample_for_bin=200000, subsample_freq=0)"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lgb_single_model = lgb.LGBMClassifier(n_estimators=900,\n",
    "                                learning_rate=0.005,\n",
    "                                min_child_weight=0.001,\n",
    "                                min_child_samples = 20,\n",
    "                                subsample=0.5,\n",
    "                                colsample_bytree=0.6,\n",
    "                                num_leaves=30,\n",
    "                                max_depth=-1,\n",
    "                                reg_lambda=0.03,\n",
    "                                reg_alpha=0.3,\n",
    "                                random_state=0)\n",
    "lgb_single_model.fit(x_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "lightgbm单模型的AUC：0.7535371506640257\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEFCAYAAAAc33cJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd4VGXax/HvtCSTnpCEEEpEIAmuIiWiKIoUEZDeFERkFQVRFBHpRdEggmtFEaQILhaagGBZsSHwwoIGKYKUVcDQUyfJ9DnvH6MTYyChTOZkJvfnuvbaTDtz52H85cxznnMfjaIoCkIIIQKCVu0ChBBCeI+EuhBCBBAJdSGECCAS6kIIEUAk1IUQIoBIqAshRADRq12AEFeqXbt2ZGVllbovLCyMxo0bM27cOJo0aeK5/7vvvmPhwoXs3bsXjUZDamoqgwcPplOnTmW2+/PPP/P222+zc+dOzGYzV199NUOGDKFbt26V/jsJcblkT10EhNGjR7N582Y2b97M999/z7vvvovBYOChhx6iqKgIgEWLFjFy5EhatWrFihUrWLFiBR07dmTChAnMmjWr1Pa+++47BgwYQK1atViwYAEff/wx3bp1Y8KECSxcuFCNX1GIi6MI4efatm2rvPfee2XuP3nypJKSkqJs3LhROXDggNK4cWPl22+/LfO87du3K6mpqcrWrVsVRVGUwsJC5aabblLeeOONMs+dN2+e0qRJEyU7O9v7v4gQXiB76iJgBQUFAaDT6VixYgVpaWm0adOmzPNatmzJLbfcwgcffADAN998g8lkYsiQIWWeO3DgQBYtWkRkZGSl1i7E5ZJQFwEpNzeXyZMnEx8fT3p6Ort37+b666+/4PNvvPFGMjMzAdi/f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rMmjVrlNGjRysTJ04sdb/dblcee+wxxWQyKXa7XRk/frySm5tb7ra81vvlYpc+hoaGepY+BqryxqJGjRpMnDgRrVaLVqvF4XCcd11/oChvLAC2bduGVqv1PCeQlTcWv/zyC3Xr1mXp0qVMnTqVqKgoIgP4co3ljUVwcDDx8fFYLBasVmvAflv5q5o1azJmzJgy92dlZZGYmEh4eDh6vZ7U1FT2799f7ra8FuoXWvoIXNLSx0BQ3ljo9XoiIyNRFIWlS5dSv379gF7CVd5YHDt2jM2bN9O/f3+1yvOp8sbCZDKxb98+Bg0axMSJE/n00085ceKEWqVWuvLGAtw7P6NHj2bcuHF07txZjRJ96qabbvKsKvyrv4/TxWSn13q/yNLHEuWNBYDNZmPu3LkYjUaGDh2qRok+U95YbNq0iZycHKZPn87Zs2fR6/UkJCQE7F57eWMRERFBgwYNiI6OBqBx48b89ttvAfsHv7yx2LVrF3l5ecyZMweAjIwM0tLSzntSY6AzGo2XnJ1e21OXpY8lyhsLRVGYPXs2ycnJPPzww2gv9nJQfqq8sRg0aBAzZszgmWeeoU2bNtx1110BG+hQ/lhcffXVHD9+nIKCApxOJ4cOHaJOnTpqlVrpyhuLsLAwgoKCMBgMBAUFERYWRlFRkVqlqqp27dqcPHmSwsJCHA4H+/fvJyUlpdzXeH31iyx9LH8sXC4Xr732Go0aNfI8f+DAgRX+Q/mrij4Xf1q+fDnR0dHVYvXLhcZiy5YtrFu3DoBWrVrRs2dPlSuuPBWNxfLly9m1axcajYa0tDQGDRoU8HPrZ86c4bXXXiMjI4PNmzdjsVjo0KGDZ/WLy+Wibdu2dOrUqdzteC3UhRBCqC+wv/sLIUQ1I6EuhBABREJdCCECiIS6EEIEEAl1IYQIIBLqQggRQCTUhRAigEioCyFEAPl/EnbO3kZQe7kAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pre = lgb_single_model.predict_proba(x_test)[:,1]\n",
    "print('lightgbm单模型的AUC：{}'.format(metrics.roc_auc_score(y_test,pre)))\n",
    "sc.plot_roc(y_test,pre)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
